import request from '@/request'

export function findAll(data) {
    return request.post("user/findByPage",data);
}

export function dofindAll() {
    return request.post("user/findAll");
}
export function findOne(userId) {
    return request.post("user/findOne",userId,request.textConfig);
}

export function doSaveOrUpdate(data) {
    let path = data.userId ? "update" : "save";
    return request.post(`user/${path}`, data);
}

export function deleteByUserId(userId) {
    return request.post("user/delete",userId,request.textConfig);
}

export function distRoleToUser(userId,roleIds) {
    return request.post("user/distRoleToUser",{userId,roleIds});
}

